package com.ruoyi.process.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.process.mapper.WorkArtiseedingMapper;
import com.ruoyi.process.domain.WorkArtiseeding;
import com.ruoyi.process.service.IWorkArtiseedingService;

/**
 * 人工播种Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-07-12
 */
@Service
public class WorkArtiseedingServiceImpl implements IWorkArtiseedingService 
{
    @Autowired
    private WorkArtiseedingMapper workArtiseedingMapper;

    /**
     * 查询人工播种
     * 
     * @param workArtiseedingId 人工播种ID
     * @return 人工播种
     */
    @Override
    public WorkArtiseeding selectWorkArtiseedingById(Long workArtiseedingId)
    {
        return workArtiseedingMapper.selectWorkArtiseedingById(workArtiseedingId);
    }

    /**
     * 查询人工播种列表
     * 
     * @param workArtiseeding 人工播种
     * @return 人工播种
     */
    @Override
    public List<WorkArtiseeding> selectWorkArtiseedingList(WorkArtiseeding workArtiseeding)
    {
        return workArtiseedingMapper.selectWorkArtiseedingList(workArtiseeding);
    }

    /**
     * 新增人工播种
     * 
     * @param workArtiseeding 人工播种
     * @return 结果
     */
    @Override
    public int insertWorkArtiseeding(WorkArtiseeding workArtiseeding)
    {
        workArtiseeding.setCreateTime(DateUtils.getNowDate());
        return workArtiseedingMapper.insertWorkArtiseeding(workArtiseeding);
    }

    /**
     * 修改人工播种
     * 
     * @param workArtiseeding 人工播种
     * @return 结果
     */
    @Override
    public int updateWorkArtiseeding(WorkArtiseeding workArtiseeding)
    {
        workArtiseeding.setUpdateTime(DateUtils.getNowDate());
        return workArtiseedingMapper.updateWorkArtiseeding(workArtiseeding);
    }

    /**
     * 批量删除人工播种
     * 
     * @param workArtiseedingIds 需要删除的人工播种ID
     * @return 结果
     */
    @Override
    public int deleteWorkArtiseedingByIds(Long[] workArtiseedingIds)
    {
        return workArtiseedingMapper.deleteWorkArtiseedingByIds(workArtiseedingIds);
    }

    /**
     * 删除人工播种信息
     * 
     * @param workArtiseedingId 人工播种ID
     * @return 结果
     */
    @Override
    public int deleteWorkArtiseedingById(Long workArtiseedingId)
    {
        return workArtiseedingMapper.deleteWorkArtiseedingById(workArtiseedingId);
    }
}
